<div class="form ">


    <?php
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
        'type' => 'horizontal',
        'id' => 'reporte-form',
        'enableAjaxValidation' => false,
        'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
        'enableClientValidation' => true,
        'htmlOptions' => array('class' => 'narrow'),
    ));
    ?>


    <h4><i class="icon-phone"></i> Reporte de Inscripciones   
    </h4>
    <div class="widget-body">
        <?php echo $form->errorSummary($model) ?>

        <div class="row-fluid controles">
            
            <div class="span6">
            <?php // echo $form->dropDownListRow($model, 'evento', array('' => ' -- Seleccione -- ') + CHtml::listData(Evento::model()->de_carrera($carrera_id)->findAll(), 'id', Evento::representingColumn())) ?>
                
                <?php $eventosLista= CHtml::listData(Evento::model()->de_carrera($carrera_id)->findAll(), 'id', Evento::representingColumn()); ?>
                    
             <?php   
                $this->widget(
        'bootstrap.widgets.TbSelect2', array(
    'asDropDownList' => true,
            'model'=>$model,
            'attribute'=>'evento',
//    'name' => 'actividad',
//                          'data' => $evento->actividads,
    'data' =>$eventosLista ? $eventosLista : array(null) ,
//    'val' => implode(",", $evento->actividads),
    'options' => array(
//                    'data' => array(
//                        0 => 'Nol',
//                        1 => 'Satu',
//                        2 => 'Dua',
//                    ),
//            'tags' => array(
//                        0 => 'Nol',
//                        1 => 'Satu',
//                        2 => 'Dua',
//                    ),
//                    'placeholder' => 'type clever, or is, or just type!',
        'width' => '92%',
        'tokenSeparators' => array(',', ' ')
    )
        )
); 
                ?>

            </div>
            <div class="span6">
 
            <?php
            $this->widget('bootstrap.widgets.TbButton', array(
                'buttonType' => 'submit',
                'type' => 'primary',
                'label' => Yii::t('AweCrud.app', 'Generar Reporte'),
                'htmlOptions' => array(
                    'style' => 'display:inline-block'
                )
            ));
            ?>
            </div>

           



        </div>


        <?php if ($visualizarReporte): ?> 

            <?php
            ?> 
            <div class="row-fluid">


                <!--                <div class="row-fluid span6" id="reportepie">
    <?php
//                    $this->Widget('ext.highcharts.HighchartsWidget', array(
//                        'scripts' => array(
//                            'modules/exporting', // adds Exporting button/menu to chart
//                        ),
//                        'options' => $piereport
//                    ));
    ?>
                                </div>-->
            </div>


            <div class="row-fluid" id="reportebarras">

    <?php
    $this->Widget('ext.highcharts.HighchartsWidget', array(
        'scripts' => array(
            'modules/exporting', // adds Exporting button/menu to chart
        ),
        'options' => $columnreport
    ));
    ?>

            </div>
<?php elseif (!$visualizarReporte && !empty($model->evento)): ?>

            <div class="span12"></div>
            <div class="row-fluid"></div>
            <div class="alert alert-block alert-info fade in">
                <center>
                    <h4 class="alert-heading">Alerta!</h4>
                    <p>
                        No existen datos entre las fechas indicadas
                    </p>
                </center>
            </div>


<?php endif; ?>
    </div>
</div>

<?php $this->endWidget(); ?>


